import java.util.Scanner;

public class Main {
    static int[] a;
    static int[] b;
    static int k;
    static int N;
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        N = s.nextInt();
        k = s.nextInt();
        a = new int[N];
        b = new int[N];
        for (int i = 0; i < N; i++) {
            a[i]=s.nextInt();
            b[i]=s.nextInt();
        }

        int l=1;
        int r= (int) 1e5;
        while(l<r) {
            int m = l+r+1>>1;
            if(check(m)) l=m;
            else r=m-1;
        }

        System.out.println(r);
    }

    private static boolean check(int m) {
        int sum=0;
        for(int i=0;i<N;i++) {
            sum+=(a[i]/m) * (b[i]/m);
            if(sum>=k) return true;
        }
        return false;

    }
}
